<!DOCTYPE html>
<html>
<head>
  <title>Coffee2go</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <%= stylesheet_link_tag    "application", :media => "all" %>
  <%= javascript_include_tag "application" %>
  <%= csrf_meta_tags %>
</head>
<body>
	<div id="wrapper">
		<% if session[:user] %>
			<%= session[:user].name %>
			<%= link_to("Đăng xuất", :controller => :users, :action => :logout ) %>
		<% end %>

		<div id="header">
			<ul>
				<li><%= link_to("Trang chủ", :controller => :home, :action => :index ) %></li>
				<li><%= link_to("Tin tức", :controller => :news, :action => :index) %></li>
				<li><%= link_to("Sản phẩm", :controller => :produces, :action => :index ) %></li>
				<li><%= link_to("Liên hệ", '#' ) %></li>
			</ul>
		</div>

		<ul class="user_">
			<% if !session[:user] %>
				<li><%= link_to("Đăng nhập", :controller => :users, :action => :login) %></li>
				<li><%= link_to("Đăng ký", :controller => :users, :action => :signup) %></li>
			<% else %>
				<%= link_to("Cập nhật lại thông tin cá nhân.", :controller => :users, :action => :edit) %>
			<% end %>
		</ul>

		<div id="mainContent">
			<%= yield %>
		</div>
	</div>
	<div id="footer">
		<div class="wrapper_footer">
			<p>&copy; 2013 Nguyen Dang Thang, All Rights Reserved </p>
		</div>
	</div>

</body>
</html>
